#include "stopInfo.h"

stopInfo::stopInfo(const QString& msg, QWidget* parent)
	: QDialog(parent)
{
	ui.setupUi(this);
	setWindowFlags(Qt::FramelessWindowHint | Qt::Tool | Qt::WindowStaysOnTopHint);
	setAttribute(Qt::WA_TranslucentBackground);
	ui.hintLabel->setText(msg);
	tipTimer = new QTimer(this);
	tipTimer->setSingleShot(true);
	connect(tipTimer, &QTimer::timeout, this, &QDialog::close);
}

stopInfo::~stopInfo()
{
	if (tipTimer != Q_NULLPTR)
		tipTimer->deleteLater();
}
void stopInfo::startTimer(int ms) {
	tipTimer->start(ms);
}
